package com.example.vehicleservice.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.redisson.config.TransportMode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author cc
 * @classname RedissonClient
 * @description TODO
 * @date 2022/7/18 11:44
 */
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://120.24.86.242:6379").setPassword("1234@Qwer").setDatabase(1);
        return Redisson.create(config);
    }
}
